package com.yuanfeng.userms.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yuanfeng.commoms.dto.userms.BusinessEmployeeDetailDTO;
import com.yuanfeng.commoms.vo.user.BusinessUserInfoDetailVO;
import com.yuanfeng.userms.entity.UserBusinessInfoEntity;
import com.yuanfeng.userms.vo.BusinessUserInfoVO;
import com.yuanfeng.userms.vo.BusinessUserListVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Map;


/**
* @Entity com.yuanfeng.userms.entity.UserBusinessInfo
*/
@Mapper
public interface UserBusinessInfoMapper extends BaseMapper<UserBusinessInfoEntity> {

    /**
     * 插入企业用户信息
     * @param businessegMap
     */
    boolean insertBusinessUser(Map<String, Object> businessegMap);

    /**
     * 判断是否企业用户
     *
     * @param
     * @return
     */
    int isBusiness(Map<String, Object> param);

    /**
     * 查询企业用户详细信息
     *
     * @param
     * @return
     */
    BusinessUserInfoVO queryInfo(Map<String, Object> param);

    /**
     * 分页查询企业用户信息
     *
     * @param
     * @return
     */

    IPage<BusinessUserListVO> queryList(IPage<BusinessUserListVO> page , @Param("param") Map<String, Object> param);


    /**
     * 查询企业员工详情
     *
     * @param map
     * @return
     */
    BusinessUserInfoDetailVO queryDetail(Map<String, Object> map);



    /**
     * 查询员工权限
     *
     * @param userId
     * @return
     */
    BusinessEmployeeDetailDTO queryEmployeeDetail(@Param("userId") String userId);

    /**
     * 校验企业名称是否存在
     * @param paraMap
     * @return
     */
    Integer selectBusinessUser(@Param("param")Map<String, String> paraMap);

}
